import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class D649 {
	public static void getTriangle(String input, StringBuffer refOutput) {
		int n = Integer.parseInt(input);
		
		for(int i = 0; i < n; i++) {
			for(int j = 0; j < n - 1 - i; j++)
				refOutput.append("_");
			for(int j = 0; j <= i; j++)
				refOutput.append("+");
			refOutput.append("\n");
		}
	}
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String input;
		StringBuffer output;
		
		while((input = br.readLine()) != null) {
			if(input.equals("0"))
				System.exit(0);
			
			output = new StringBuffer();

			getTriangle(input, output);
			
			System.out.print(output);
		}
	}
}